/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/include/ "msm8974pro-sii8240_mhl-k-r02.dtsi"
/include/ "msm8974pro-fingerprint-sensor-chagalljpn-r00.dtsi"
/include/ "msm8974pro-camera-sensor-chagalljpn-r00.dtsi"

/ {
	aliases {
		serial0 = &blsp1_uart1;
		serial1 = &blsp2_uart1;
		/*uart3 = &uart1;*/
	};
};

&soc {
	serial@f991e000 {
		status = "ok";
	};

	serial@f995d000 {
		status = "ok";
	};

	samsung,vibrator {
		compatible = "vibrator";
		samsung,pmic_vib_pwm = <&msmgpio 27 0>;
		samsung,vib_model = <1>;
		samsung,pmic_vib_en = <0>;
		samsung,pmic_haptic_pwr_en = <0>;
		samsung,is_pmic_vib_pwm = <0>;
		samsung,pwm_period_us = <40>;
		samsung,duty_us = <36>;
		status = "ok";
	};

	i2c@f9963000 {
		cell-index = <7>;
		compatible = "qcom,i2c-qup";
		reg = <0xf9963000 0x1000>;
		#address-cells = <1>;
		#size-cells = <0>;
		reg-names = "qup_phys_addr";
		interrupts = <0 101 0>;
		interrupt-names = "qup_err_intr";
		qcom,i2c-bus-freq = <100000>;
		qcom,i2c-src-freq = <50000000>;
		qcom,master-id = <84>;
		actuator1: qcom,actuator@18 {
			compatible = "qcom,actuator";
			cell-index = <1>;
			reg = <0x18>;
			gpios = <&msmgpio 43 0>,
				<&msmgpio 44 0>;
			qcom,gpio-req-tbl-num = <0 1>;
			qcom,gpio-req-tbl-flags = <1 1>;
			qcom,gpio-req-tbl-label = "I2C_DATA0",
						  "I2C_CLK0";
		};
	};

	i2c@f9924000 {
		status = "okay";
		qcom,scl-gpio = <&msmgpio 7 0>;
		qcom,sda-gpio = <&msmgpio 6 0>;
		qcom,noise-rjct-scl = <1>;
		qcom,i2c-bus-freq = <300000>;
		synaptics@20 {
			compatible = "synaptics,rmi4-ts";
			reg = <0x20>;
			interrupt-parent = <&msmgpio>;
			interrupts = <79 0>;
			vcc_i2c-supply = <&pma8084_lvs2>;
			synaptics,supply-num = <1>;		/* the number of regulators */
			synaptics,supply-name = "8084_lvs2";	/* the name of regulators, in power-on order */
			synaptics,external_ldo = <&msmgpio 85 0x1>;
			synaptics,irq-gpio = <&msmgpio 79 0x1>;
			synaptics,i2c-pull-up = <1>;
			synaptics,tsp-project = "Chagall";
			synaptics,tsp-coords = <1559 2559>;
			synaptics,tablet = <1>;
			synaptics,tsp-extra_config = <0 0 0 0>;/* <"pwrctrl", "N", "N", "N"> */
		};
	};

	/* templete of i2c-gpio */
  i2c@15{
      cell-index = <15>;
      compatible = "i2c-gpio";
      gpios = <&msmgpio 95 0  /*SDA*/
              &msmgpio 96 0  /*SCL*/
             >;
      i2c-gpio,delay-us = <2>;
      #address-cells = <1>;
      #size-cells = <0>;
		  status = "disabled"; /*just templete, and then disable it
				       don't care all property despite of duplication */
      templete@25{
              compatible = "templete,i2c";
              reg = <0x25>;
              interrupt-parent = <&msmgpio>;
              interupts= <82 0>;
    };
  };

	i2c@66 {
		cell-index = <66>;
		compatible = "i2c-gpio";
		gpios = <&msmgpio 0 0 /* sda */
			&msmgpio 1 0 /* scl */
			>;
		sx9500-i2c@28 {
			compatible = "sx9500-i2c";
			reg = <0x28>;
			sx9500-i2c,nirq-gpio = <&msmgpio 111 0x00>;
			sx9500-i2c,scl-gpio = <&msmgpio 1 0x00>;
			sx9500-i2c,sda-gpio = <&msmgpio 0 0x00>;
			sx9500-i2c,i2c-pull-up = <1>;
		};
	};

	i2c@67 {

			cell-index = <67>;
			compatible = "i2c-gpio";
			gpios = <&msmgpio 83 0  /*SDA*/
			&msmgpio 84 0  /*SCL*/
			>;
		i2c-gpio,delay-us = <2>;
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";
		bma255-i2c@18 {
                        compatible = "bma255-i2c";
                        reg = <0x18>;
                        interrupt-parent = <&msmgpio>;
                        interrupts = <42 0>;
                        bma255-i2c,scl = <&msmgpio 84 0>;
                        bma255-i2c,sda = <&msmgpio 83 0>;
                        bma255-i2c,acc_int1-gpio = <&msmgpio 42 0x00>;
                        bma255-i2c,chip_pos = <4>;
                        bma255-i2c,vdd-supply = <&pma8084_l18>;
                        bma255-i2c,vdd-io-supply = <&pma8084_lvs1>;
                };
		bmg160-i2c@68 {
                        compatible = "bmg160-i2c";
                        reg = <0x68>;
                        interrupt-parent = <&msmgpio>;
                        interrupts = <42 0>;
                        bmg160-i2c,gyro_int-gpio = <&msmgpio 42 0x00>;
                        bmg160-i2c,chip_pos = <4>;
                };
		ak09911c-i2c@0C {
			compatible = "ak09911c-i2c";
			status = "okay";
			reg = <0x0c>;
			ak09911c-i2c,m_rst_n-gpio = <&msmgpio 122 0x01>;
			ak09911c-i2c,chip_pos = <5>;
			ak09911c-i2c-vcc-supply = <&pma8084_l18>;
                        ak09911c-i2c-lvs1-supply = <&pma8084_lvs1>;

		};
		cm3323-i2c@10 {
			compatible = "cm3323-i2c";
			reg = <0x10>;
		};
	};

	i2c@16 {
		cell-index = <16>;
		compatible = "i2c-gpio";

		gpios = <&msmgpio 29 0
			&msmgpio 30 0
			>;

		i2c-gpio,delay-us = <2>;
	};

	i2c@21 {
		cell-index = <21>;
		compatible = "i2c-gpio";
		gpios = <&msmgpio 95 0 /* sda */
			 &msmgpio 96 0 /* scl */
			>;
		#address-cells = <1>;
		#size-cells = <0>;

		tc360@60 {
			compatible = "coreriver,coreriver-tkey";
			reg = <0x60>;
                        interrupt-parent = <&pma8084_gpios>;
                        interrupts = <6 0>;
			coreriver,vcc_en_ldo_name = "max77826_ldo15";
			coreriver,vdd_led_ldo_name = "max77826_ldo12";
                        coreriver,scl-gpio = <&msmgpio 96 0x00>;
                        coreriver,sda-gpio = <&msmgpio 95 0x00>;
                        coreriver,irq-gpio = <&pma8084_gpios 6 0x1>;
                        coreriver,tkey-keycodes = <254 158>;
                        coreriver,i2c-pull-up = <1>;
		};
	};

	i2c@22 {
		cell-index = <22>;
		compatible = "i2c-gpio";
		gpios = <&msmgpio 109 0 /* sda */
			&msmgpio 108 0 /* scl */
		>;

		i2c-gpio,delay-us = <2>;
		#address-cells = <1>;
		#size-cells = <0>;
		irda_ice40@50 {
			compatible = "irda_ice40";
			reg = <0x50>;
			interrupt-parent = <&msmgpio>;
			interrupts = <101 0>;
			irda_ice40,fw_ver = <2>;
			irda_ice40,reset_n = <&msmgpio 74 0x00>;
			irda_ice40,scl-gpio = <&msmgpio 108 0x00>;
			irda_ice40,sda-gpio = <&msmgpio 109 0x00>;
			irda_ice40,irq-gpio = <&msmgpio 101 0x00>;
			irda_ice40,cresetb = <&pma8084_gpios 12 0x1>;
			irda_ice40,i2c-pull-up = <1>;
			/* only use usa_vzw tunable ant */
			tunable,support = <0>;
			tunable,cresetb = <&msmgpio 50 0x00>;
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		input-name = "gpio-keys";

		home_key {
			label = "home_key";
			gpios = <&pma8084_gpios 3 0x1>;
			linux,input-type = <1>;
			linux,code = <172>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};

		vol_down {
			label = "volume_down";
			gpios = <&pma8084_gpios 2 0x1>;
			linux,input-type = <1>;
			linux,code = <114>;
			debounce-interval = <15>;
		};

		vol_up {
			label = "volume_up";
			gpios = <&pma8084_gpios 5 0x1>;
			linux,input-type = <1>;
			linux,code = <115>;
			debounce-interval = <15>;
		};

		hall_flip {
			label = "hall_flip";
			gpios = <&pma8084_gpios 1 0x0>;
			linux,input-type = <1>;
			linux,code = <0x15>;
			gpio-key,wakeup;
			debounce-interval = <15>;
	                /*HALL_IC, interrupt w/a code disable*/
			hall_wa_disable;
		};
	};

	spi@f9966000 {
		status = "ok";
	};

	spi@f9923000 {
		status = "disabled";
	};

	i2c@f9923000 { /* BLSP#1 */
		status = "ok";
		ncp6335b@1c {
			compatible = "ncp6335b,camera-dcdc";
			reg = <0x1c>;
		};
	};

		/* BLSP #9 */
	i2c@f9965000
	{
		status = "ok";
		pn547@2B
		{
			compatible = "pn547";
			reg = <0x2B>;
			interrupt-parent = <&pma8084_gpios>;
			interrupts = <10 0>;
			pn547,irq-gpio = <&pma8084_gpios 10 0x00>;
			pn547,ven-gpio = <&pma8084_gpios 4 0x00>;
			pn547,firm-gpio = <&msmgpio 49 0x00>;
		};
	};

	qcom,mdss_dsi@fd922800 {
		qcom,dsi-pref-prim-pan = <&dsi_dual_2560p_cmd_right>;
		qcom,platform-supply-entry1 {
				qcom,supply-name = "vdd";
				qcom,supply-min-voltage = <3000000>;
				qcom,supply-max-voltage = <3000000>;
				qcom,supply-enable-load = <100000>;
				qcom,supply-disable-load = <100>;
				qcom,supply-pre-on-sleep = <0>;
				qcom,supply-post-on-sleep = <0>;
				qcom,supply-pre-off-sleep = <0>;
				qcom,supply-post-off-sleep = <0>;
		};
		qcom,platform-supply-entry2 {
				qcom,supply-name = "vddio";
				qcom,supply-min-voltage = <1800000>;
				qcom,supply-max-voltage = <1800000>;
				qcom,supply-enable-load = <100000>;
				qcom,supply-disable-load = <100>;
				qcom,supply-pre-on-sleep = <0>;
				qcom,supply-post-on-sleep = <0>;
				qcom,supply-pre-off-sleep = <0>;
				qcom,supply-post-off-sleep = <0>;
		};
	};

	qcom,mdss_dsi@fd922e00 {
		qcom,dsi-pref-prim-pan = <&dsi_dual_2560p_cmd_left>;
	};

	qcom,mdss_mdp@fd900000 {
		qcom,mdss-pref-prim-intf = "dsi";
		mdss_fb0: qcom,mdss_fb_primary {
			qcom,memory-reservation-type = "EBI1";
			qcom,memblock-reserve = <0x03200000 0x00F00000>;
			qcom,mdss-fb-split = <1280 1280>;
		};
	};

	qcom,ssusb@f9200000 {
		/*vbus_dwc3-supply = <&pm8941_mvs1>;*/
	};

	qcom,hdmi_tx@fd922100 {
		status = "ok";
	};

	sound {
		qcom,model = "msm8974-taiko-cdp-snd-card";
		qcom,hdmi-audio-rx;
		qcom,mainmic-bias-gpio = <&pma8084_gpios 17 0>;
                qcom,earjack-fsa_en-gpio = <&pma8084_mpps 2 0x00>;
		qcom,spkamp-en-gpio = <&msmgpio 135 0>;

		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"LDO_H", "MCLK",
			"AIF4 MAD", "MCLK",
			"Lineout_1 amp", "LINEOUT1",
			"Lineout_2 amp", "LINEOUT2",
			"Lineout_3 amp", "LINEOUT3",
			"Lineout_4 amp", "LINEOUT4",
			"AMIC1", "Main Mic Bias",
			"Main Mic Bias", "Main Mic",
			"AMIC2", "MIC BIAS2 External",
			"MIC BIAS2 External", "Headset Mic";
	};

	det_zones: det_zones {
		#list-det-cells = <4>;
	};

	but_zones: but_zones {
		#list-but-cells = <3>;
	};

	earjack {
		compatible = "sec_jack";
		qcom,earjack-read-vadc = <&pma8084_vadc>;
		qcom,earjack-sendend-gpio = <&msmgpio 77 0>;
		qcom,send-end-active-high;
		det-zones-list = <&det_zones 3 10000 10 0>,
						<&det_zones 667 10000 10 0>,
						<&det_zones 2600 10000 10 1>,
						<&det_zones 9999 10000 10 1>;
		but-zones-list = <&but_zones 0 0 228>,
						<&but_zones 1 229 321>,
						<&but_zones 2 322 505>;
		mpp-channel-scaling = <4 1 3>;
	};

	battery {
		status = "okay";
		compatible = "samsung,sec-battery";
		battery,vendor = "SDI SDI";
		battery,charger_name = "sec-charger";
		battery,fuelgauge_name = "sec-fuelgauge";
		battery,technology = <2>; /* POWER_SUPPLY_TECHNOLOGY_LION */
		/* battery,bat_int = <&pma8084_mpps 8 0>; */
		battery,bat_irq = <509>; /* IF_PMIC_IRQ_BASE + MAX77803_CHG_IRQ_BATP_I*/
		battery,bat_irq_attr = <0x2>;

		battery,chip_vendor = "QCOM";
		battery,temp_adc_type = <1>; /* SEC_BATTERY_ADC_TYPE_AP */

		battery,polling_time = <10 30 30 30 3600>;

		battery,adc_check_count = <5>;

		battery,cable_check_type = <4>; /* SEC_BATTERY_CABLE_CHECK_PSY */
		battery,cable_source_type = <1>; /* SEC_BATTERY_CABLE_SOURCE_EXTERNAL */
		battery,event_check;
		battery,event_waiting_time = <600>;
		battery,polling_type = <1>; /* SEC_BATTERY_MONITOR_ALARM */
		battery,monitor_initial_count = <3>;

		battery,battery_check_type = <1>; /* SEC_BATTERY_CHECK_ADC */
		battery,check_count = <0>;
		battery,check_adc_max = <1440>;
		battery,check_adc_min = <0>;

		battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */

		battery,thermal_source = <2>; /* SEC_BATTERY_THERMAL_SOURCE_ADC */

		battery,temp_check_type = <2>; /* _BATTERY_TEMP_CHECK_TEMP */
		battery,temp_check_count = <1>;
		battery,temp_high_threshold_event = <660>;
		battery,temp_high_recovery_event = <479>;
		battery,temp_low_threshold_event = <(-47)>;
		battery,temp_low_recovery_event = <0>;
		battery,temp_high_threshold_normal = <660>;
		battery,temp_high_recovery_normal = <479>;
		battery,temp_low_threshold_normal = <(-47)>;
		battery,temp_low_recovery_normal = <0>;
		battery,temp_high_threshold_lpm = <660>;
		battery,temp_high_recovery_lpm = <479>;
		battery,temp_low_threshold_lpm = <(-47)>;
		battery,temp_low_recovery_lpm = <0>;
		battery,full_check_type = <7>; /* SEC_BATTERY_FULLCHARGED_CHGPSY */
		battery,full_check_type_2nd = <3>; /* SEC_BATTERY_FULLCHARGED_TIME */
		battery,full_check_count = <1>;
		battery,chg_gpio_full_check = <0>;
		battery,chg_polarity_full_check = <1>;

		/* SEC_BATTERY_FULL_CONDITION_SOC |
		   SEC_BATTERY_FULL_CONDITION_NOTIMEFULL |
		   SEC_BATTERY_FULL_CONDITION_VCELL */
		battery,full_condition_type = <13>;
		battery,full_condition_soc = <93>;
		battery,full_condition_vcell = <4250>;

		battery,recharge_check_count = <1>;
		battery,recharge_condition_type = <4>; /* SEC_BATTERY_RECHARGE_CONDITION_VCELL */
		battery,recharge_condition_soc = <98>;
		battery,recharge_condition_vcell = <4300>;

		battery,charging_total_time = <36000>;
		battery,recharging_total_time = <5400>;
		battery,charging_reset_time = <0>;

		charger{
			status = "disable";
			/* Charger */
			battery,charger_name = "sec-charger";
			battery,chg_gpio_en = <0>;
			battery,chg_irq = <&pma8084_gpios 7 0x1>;
			battery,detbat_irq = <513>; /* IF_PMIC_IRQ_BASE + MAX77804K_CHG_IRQ_BAT_I*/
			battery,pogo_det_gpio = <&pma8084_mpps 5 0x00>;
			battery,shdn_gpio = <&msmgpio 145 0x00>;
			battery,ovp_gpio_en = <&msmgpio 126 0>;
			battery,chg_vf_det = <&pma8084_mpps 8 0>; /* &pma8084 mpp 8 0x00*/
			battery,chg_irq_attr = <2>; /* IRQF_TRIGGER_FALLING */
			battery,chg_polarity_en = <0>;
			battery,chg_gpio_status = <0>;
			battery,chg_polarity_status = <0>;
			battery,chg_float_voltage = <4350>;
			battery,chg_high_temp = <520>;
			battery,chg_high_temp_recovery = <420>;
			battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */
			battery,full_check_type = <7>; /* SEC_BATTERY_FULLCHARGED_CHGPSY */
			battery,full_check_type_2nd = <3>; /*SEC_BATTERY_FULLCHARGED_TIME */

			battery,input_current_limit = <1800 460 460 1800 460 900 1000 460 460 1000 650 1800 1800 460 1300 400 700 1300 300 1000 1800 460 1800 1800 460>;
			battery,fast_charging_current = <1800 0 460 2300 460 1200 1000 460 0 1200 750 2100 2100 0 1300 400 700 1300 300 1000 2100 0 2800 2800 0>;
			battery,full_check_current_1st = <250 0 250 250 250 250 250 250 250 0 250 250 250 250 0 250 250 250 250 250 250 250 200 250 0>;
			battery,full_check_current_2nd = <2400 0 2400 2400 2400 2400 2400 2400 0 2400 2400 2400 2400 0 2400 2400 2400 2400 2400 2400 2400 0 2400 2400 0>;
		};
	};
};


&sdcc1 {
       status = "disabled";
};

&sdcc2 {
	#address-cells = <0>;
	interrupt-parent = <&sdcc2>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 125 0
			1 &intc 0 220 0
			2 &msmgpio 62 0x3>;
	interrupt-names = "core_irq", "bam_irq", "status_irq";
	cd-gpios = <&msmgpio 62 0x1>;
	status = "disabled";
};

&sdhc_1 {
	vdd-supply = <&pma8084_l20>;
	vdd-io-supply = <&pma8084_s4>;

	qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 192000000 384000000>;

	qcom,vdd-always-on;
	qcom,vdd-lpm-sup;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <800 500000>;

	qcom,vdd-io-always-on;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <250 154000>;

	qcom,bus-speed-mode = "HS400_1p8v", "HS200_1p8v", "DDR_1p8v";

	qcom,pad-pull-on = <0x0 0x3 0x3 0x1>; /* no-pull, pull-up, pull-up, pull-down */
	qcom,pad-pull-off = <0x0 0x3 0x3 0x1>; /* no-pull, pull-up, pull-up, pull-down */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,nonremovable;
	status = "ok";
};

&sdhc_2 {
	#address-cells = <0>;
	interrupt-parent = <&sdhc_2>;
	interrupts = <0 1>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 125 0
			1 &intc 0 221 0>;
	interrupt-names = "hc_irq", "pwr_irq";

	vdd-supply = <&pma8084_s4>;
	vdd-io-supply = <&pma8084_s4>;

	qcom,vdd-always-on;
	qcom,vdd-voltage-level = <1800000 1800000>;
	qcom,vdd-current-level = <2000 32000>;

	qcom,vdd-io-always-on;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <2000 32000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x3 0x3 0x2>; /* 8mA, 8mA, 6mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,current-limit = <32000>;

	qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;

	qcom,sup-voltages = <2950 2950>;

	status-cb = <2>;
	status = "ok";
};

&sdhc_3 {
	#address-cells = <0>;
	interrupt-parent = <&sdhc_3>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 127 0
			1 &intc 0 224 0
			2 &msmgpio 62 0x3>;
	interrupt-names = "hc_irq", "pwr_irq", "status_irq";
	cd-gpios = <&msmgpio 62 0x1>;

	vdd-supply = <&pma8084_l21>;
	vdd-io-supply = <&pma8084_l13>;

	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <9000 800000>;

	qcom,vdd-io-voltage-level = <1800000 2950000>;
	qcom,vdd-io-current-level = <6 22000>;
	qcom,sup-voltages = <2950 2950>;


	qcom,clk-rates = <400000 20000000 25000000 50000000>;

	status = "ok";
};

/* Drive strength recommendations for clock line from hardware team is 10 mA.
 * But since the driver has been been using the below values from the start
 * without any problems, continue to use those.
 */
&sdcc1 {
	qcom,pad-drv-on = <0x7 0x4 0x4>; /* 16mA, 10mA, 10mA */
};

&sdcc2 {
	qcom,pad-drv-on = <0x7 0x4 0x4>; /* 16mA, 10mA, 10mA */
};

&usb_otg {
	qcom,hsusb-otg-otg-control = <2>;
};

&cci {
	qcom,camera@6e {
		qcom,vdd-cx-supply = <&pma8084_s2>;
		cam_vdig-supply = <&pma8084_l3>;
		cam_vana-supply = <&pma8084_l17>;
		cam_vaf-supply = <&pma8084_l23>;
	};

	qcom,camera@20 {
		qcom,vdd-cx-supply = <&pma8084_s2>;
		cam_vdig-supply = <&pma8084_l3>;
		cam_vana-supply = <&pma8084_l17>;
		cam_vaf-supply = <&pma8084_l23>;
	};

	qcom,camera@6c {
		qcom,vdd-cx-supply = <&pma8084_s2>;
		cam_vdig-supply = <&pma8084_l3>;
		cam_vana-supply = <&pma8084_l17>;
	};

	qcom,camera@90 {
		qcom,vdd-cx-supply = <&pma8084_s2>;
		cam_vdig-supply = <&pma8084_l3>;
		cam_vana-supply = <&pma8084_l17>;
	};
};

&pma8084_gpios {
	gpio@c000 { /* GPIO 1 */
		/* Hall IC */
		qcom,mode = <0>;                /* Digital input */
		qcom,output-type = <0>;
		qcom,vin-sel = <2>;
		qcom,out-strength = <2>;
		qcom,src-sel = <3>;
		qcom,pull = <5>;                /* QPNP_PIN_PULL_NO */
		qcom,master-en = <1>;
	};

	gpio@c100 { /* GPIO 2 */
		/* Vol_down button */
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <0>;		/* Pull up 30 uA */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,master-en = <1>;
	};

	gpio@c200 { /* GPIO 3 */
		/* Snapshot button */
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <0>;		/* Pull up 30 uA */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,master-en = <1>;
	};

	gpio@c300
	{
		/* GPIO 4. NFC VEN. */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;		/* CMOS logic */
		qcom,invert = <0>;		/* Do not invert the output */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,src-sel = <0>;		/* GPIO */
		qcom,pull = <5>;                /* QPNP_PIN_PULL_NO */
		qcom,out-strength = <2>;	/* Medium drive strength */
		qcom,master-en = <1>;		/* Enable GPIO */
	};

	gpio@c400 { /* GPIO 5 */
		/* Volume up button */
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <0>;		/* Pull up 30 uA */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,master-en = <1>;
	};

	gpio@c500 { /* GPIO 6 */
		/* Touchkey IRQ */
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <5>;		/* Pull none */
		qcom,master-en = <1>;
		qcom,output-type = <0>;
		qcom,vin-sel = <2>;
		qcom,out-strength = <2>;
		qcom.src-sel = <3>;
	};

	gpio@c600 { /* GPIO 7 */
		/* CHG_INTB */
		qcom,mode = <0>;		/* Digital input */
		qcom,output-type = <0>;
		qcom,vin-sel = <2>;
		qcom,out-strength = <2>;
		qcom,src-sel = <0>;
		qcom,pull = <5>;                /* QPNP_PIN_PULL_NO */
		qcom,master-en = <1>;
	};

	gpio@c700 { /* GPIO 8 */
		/* CAM VT STBY */
		qcom,vin-sel = <2>;
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <5>;		/* Pull none */
		qcom,master-en = <1>;
	};

	gpio@c800 { /* GPIO 9 */
		/* Touchscreen external LDO enable */
		qcom,mode = <1>;		/* Digital output */
		qcom,out-strength = <1>;	/* Low */
		qcom,src-sel = <2>;		/* Function 1  */
		qcom,master-en = <1>;
	};

	gpio@c900
	{
		/* GPIO 10. NFC IRQ.*/
		qcom,mode = <0>;		/* Digital input */
		qcom,output-type = <0>;
		qcom,vin-sel = <2>;
		qcom,out-strength = <2>;
		qcom,src-sel = <0>;
		qcom,pull = <5>;                /* QPNP_PIN_PULL_NO */
		qcom,master-en = <1>;
	};

	gpio@ca00 { /* GPIO 11 */
		/* FPGA CReset_b */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;		/* CMOS logic */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,out-strength = <1>;	/* Low */
		qcom,src-sel = <0>;		/* Constant */
		qcom,master-en = <1>;
	};

	gpio@cb00 { /* GPIO 12 */
		/* Ear Micbias Enable */
		qcom,mode = <1>;			/* Digital output */
		qcom,output-type = <0>;	/* CMOS logic */
		qcom,pull = <5>;			/* QPNP_PIN_PULL_NO */
		qcom,invert = <0>;		/* Output low initially */
		qcom,vin-sel = <2>;		/* PM8941 S3 = 1.8 V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,out-strength = <2>;	/* Medium drive strength */
		qcom,master-en = <1>;	/* Enable GPIO */
	};

	gpio@cc00 { /* GPIO 13 */
		/* TS_CHGR_IN */
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <4>;		/* Pull down */
		qcom,master-en = <1>;
	};

	gpio@ce00 { /* GPIO 15 */
		/* Codec clock */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;		/* CMOS */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,out-strength = <1>;	/* Low */
		qcom,src-sel = <2>;		/* Function 1 - DIVCLK1 */
		qcom,master-en = <1>;
	};

	gpio@cf00 { /* GPIO 16 used for BT sleep_clk*/
		qcom,mode = <1>;
		qcom,output-type = <0>;
		qcom,pull = <5>;
		qcom,out-strength = <3>;
		qcom,vin-sel = <2>;
		qcom,src-sel = <3>;
		qcom,master_en = <1>;
	};

	gpio@d000 { /* GPIO 17 */
		/* MAIN_MICBIAS_EN */
		qcom,mode = <1>;		/* Digital output */
		qcom,pull = <5>;		/* Pull down */
		qcom,output-type = <0>;		/* CMOS */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,out-strength = <1>;	/* Low */
		qcom,src-sel = <0>;		/* constant */
		qcom,master-en = <1>;
	};

	gpio@d100 { /* GPIO 18 */
		qcom,mode = <1>;		/* Digital output */
		qcom,vin-sel = <2>;		/* PM8941 S3 = 1.8 V */
		qcom,out-strength = <1>;	/* Low */
		qcom,src-sel = <0>;		/* Function 1  */
		qcom,master-en = <1>;
	};

	gpio@d200 { /* GPIO 19 */
		/* BOOST_BYP */
	};

	gpio@d300 { /* GPIO 20 */
		/* Headset Det */
		qcom,mode = <0>;		/* iutput */
		qcom,pull = <5>;		/* Pull down */
		qcom,vin-sel = <2>;	/* PMA8084 S4 = 1.8 V */
		qcom,src-sel = <0>;	/* Constant */
		qcom,master-en = <1>;
	};

	gpio@d400 { /* GPIO 21 */
		/* Fuel Alert */
		qcom,mode = <0>;		/* Digital input */
		qcom,pull = <5>;		/* QPNP_PIN_PULL_NO */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8 V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,master-en = <1>;
	};

	gpio@d500 { /* GPIO 22 */
		/* BATT_REM_ALARM */
	};
};

&pma8084_mpps {
	mpp@a000 { /* MPP 1 */
		/* SDC_UIM_VBIAS */
		status = "disabled";
	};

	mpp@a100 { /* MPP 2 */
		/* COMP_EN */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;		/* CMOS */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8V > 1.6V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,out-strength = <2>;	/* Medium */
		qcom,master-en = <1>;
	};

	mpp@a200 { /* MPP 3 */
		/* VREF_DAC */
	};

	mpp@a300 { /* MPP 4 */
		qcom,mode = <4>; /* AIN input */
		qcom,ain-route = <3>; /* AMUX 8 */
		qcom,master-en = <1>;/* Enable MPP4 */
		qcom,src-sel = <0>; /* Function constant */
	};

        mpp@a400 { /* MPP 5 */
                qcom,mode = <4>; /* AIN input */
                qcom,ain-route = <0>; /* AMUX 5 */
                qcom,master-en = <1>;/* Enable MPP5 */
                qcom,src-sel = <0>; /* Function constant */
        };

	mpp@a500 { /* MPP 6 */
		/* SPI ethernet enable */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;		/* CMOS */
		qcom,vin-sel = <2>;		/* PMA8084 S4 = 1.8V > 1.6V */
		qcom,src-sel = <0>;		/* Constant */
/*		qcom,out-strength = <1>;*/	/* Low */
		qcom,master-en = <1>;
	};

	mpp@a600 { /* MPP 7 */
		/* NFC disable */
		qcom,mode = <1>;		/* Digital output */
		qcom,out-strength = <1>;	/* Low */
		qcom,master-en = <1>;
	};

	mpp@a700 { /* MPP 8 */
		qcom,mode = <4>; /* AIN input */
		qcom,ain-route = <3>; /* AMUX 8 */
		qcom,master-en = <1>;/* Enable MPP4 */
		qcom,src-sel = <0>; /* Function constant */
	};
};

&vph_pwr_vreg {
	status = "ok";
};

&slim_msm {
	taiko_codec {
		qcom,cdc-reset-gpio = <&msmgpio 78 0>;
		qcom,cdc-micbias1-ext-cap;
		qcom,cdc-micbias3-ext-cap;
		qcom,cdc-micbias4-ext-cap;
		qcom,cdc-micbias1-cfilt-sel = <0x0>;
		qcom,cdc-micbias2-cfilt-sel = <0x1>;
		qcom,cdc-micbias3-cfilt-sel = <0x0>;
		qcom,cdc-micbias4-cfilt-sel = <0x0>;

		/*
		 * Liquid has external spkrdrv supply. Give a dummy supply to
		 * make codec driver's happy.
		 */
		cdc-vdd-spkdrv-supply = <&vph_pwr_vreg>;
		qcom,cdc-vdd-spkdrv-voltage = <0 0>;
		qcom,cdc-vdd-spkdrv-current = <0>;

		qcom,cdc-on-demand-supplies = "cdc-vdd-spkdrv";
	};
};

&usb3 {
	qcom,gpio_usb_rdrv_en = <312>;
};

&spmi_bus {
	qcom,pma8084@0 {
		qcom,power-on@800 {
			qcom,s3-debounce = <128>;

			qcom,pon_1 {
				qcom,pon-type = <0>;
				qcom,disable-reset = <1>;
				qcom,pull-up = <1>;
				linux,code = <116>;
			};

			qcom,pon_2 {
				qcom,pon-type = <1>;
				qcom,support-reset = <0>;
				qcom,disable-reset = <1>;
				qcom,pull-up = <0>;
				qcom,s1-timer = <0>;
				qcom,s2-timer = <2000>;
				qcom,s2-type = <1>;
				linux,code = <0>;
			};

			qcom,pon_3 {
				qcom,pon-type = <3>;
				qcom,support-reset = <1>;
				qcom,s1-timer = <6720>;
				qcom,s2-timer = <1000>;
				qcom,s1-timer2 = <10256>;
				qcom,s2-timer2 = <100>;
				qcom,s2-type = <1>;
				qcom,pull-up = <1>;
			};
		};
	};
};
